/*
Copyright Polyakov Mark (qshadowp) 2012.
GNU GPLv3
*/
 
 package system.apps;
 
 import system.staros.ablock1.*;
 import java.lang.*;
 
  public class usr extends AppBase {
 	
 	int task_id;	

 	public void run () {
		println ("You can't run <usr> in the background");
 	}
 	public String getVersion(){
	return "1.0 for StarOS v2.253";
	}
 	public int main ( String args[] ) {

 		if (args.length==1){
		if (args[0].equalsIgnoreCase("-h")){	
		System.out.println(" - User Utils  v1.0 -");
		System.out.println(" - Flags: -");
		System.out.println("  -h : Help");
		System.out.println("  -s : Set user name");
		System.out.println("  -g : Returns user name");
		}
		if (args[0].equalsIgnoreCase("-g")){	
		System.out.println("Username: "+UserUtils.getUserName());
		}
		} else if (args.length==2){
		if (args[0].equalsIgnoreCase("-s")){
		UserUtils.setUserName(args[1]);
		System.out.println("User name setted to: "+args[1]);
		}
		} else System.out.println("Unknown arguments. Type usr -h for help");
		return 0;
 	}
 	
 }